package cn.maidouya.hrm.controller;

import cn.maidouya.hrm.service.IEmployeeService;
import cn.maidouya.hrm.util.AjaxResult;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.security.access.prepost.PreAuthorize;
import org.springframework.web.bind.annotation.*;

@RestController
@RequestMapping("/system")
public class SystemController {
    @Autowired
    private IEmployeeService employeeService;
    @PostMapping("/aouthSystem/{id}")
    @PreAuthorize("hasAuthority('system:loadUser')")
    public AjaxResult loadLoginUserById(@PathVariable("id") Long id){
        return employeeService.loadAuthInfoByLoginUserId(id);
    }
}